package com.wwh.aop.homework;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.junit.jupiter.api.Test;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author Albert
 * @date 2024/8/27-13:15
 * @describe
 */
//@Component
//@Aspect
public class CalAspect {
    //@Before(value = "execution(public int MyCal.*(..))")
    public void before(){
        System.out.println("开始时间=" + System.currentTimeMillis());
    }

    //@AfterReturning(value = "execution(public int MyCal.*(..))")
    public void after(){
        System.out.println("结束时间=" + System.currentTimeMillis());
    }
}
